<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
</head>
<body>

<button onclick="submit()">点击</button>
<script>
    function submit(){
        $.ajax({
            url:"http://localhost:8080/",
            method:'get',
            success:function(res){
                console.log("结果是",res)
            }
        })
    }
</script>
</body>
</html>